/**
 Copyright (C) 2013 Yuyao Liang

 This source code is release under the BSD License.

 This program is distributed in the hope that it will be useful, but WITHOUT
 ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS
 FOR A PARTICULAR PURPOSE.  See the license for more details.

 Created on Oct 25, 2013 11:40:15 AM
 */
package com.googlecode.backtest.rule.ta;

import java.util.List;

import com.googlecode.backtest.dataset.manager.DataReadyEvent;
import com.googlecode.backtest.dataset.manager.IDataManager;
import com.googlecode.backtest.rule.BackTestAlgorithm;

/**
 * @author lianyuy
 * 
 */
public abstract class TABackTestAlgorithm<T, S> extends BackTestAlgorithm<T, S> {

	protected IDataManager manager = null;

	/**
	 * 
	 * @param id
	 * @param data_ids
	 */
	public TABackTestAlgorithm(String id, List<String> data_ids, S parameter) {
		super(id, data_ids, parameter);
	}

	/*
	 * (non-Javadoc)
	 * 
	 * @see
	 * com.googlecode.backtest.dataset.manager.DataReadyEventListener#OnDataReady
	 * (com.googlecode.backtest.dataset.manager.DataReadyEvent)
	 */
	@Override
	public void OnDataReady(DataReadyEvent event) {
		if (manager == null) {
			manager = event.getManager();
		}

	}

}
